package file;

import java.io.File;

/**
 * @author Luka
 * @date 2021/05/27 11:44
 *
 * 删除目录
 **/
public class DeleteDirDemo {
    public static void main(String[] args) {
        //删除当前目录下的目录
        File dir = new File("D:\\IDEA_WorkSpace\\JSD2104_SE\\src\\main\\java\\homework\\day03goodgoodstudydaydayup.txt");
        if(dir.exists()){
            dir.delete();
            System.out.println("删除了");
        }else {
            System.out.println("不存在这个目录");

        }
    }
}